import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class User extends Thread {
	Socket socket;
	private InputStream input;
	private Parser parser;
	serverInput SIP;
	serverOutPut SUP;
	private String name;
	private IRCServer ircS;
	public boolean isRegistered;
	private String Nick;
	private String realName;

	public User(Socket socket, IRCServer ircS) {
		this.socket = socket;
		this.ircS = ircS;
		isRegistered = false;
	}

	public void run() {
		SIP = new serverInput(this);
		SIP.run();

		SUP = new serverOutPut(socket);
		SUP.run();

		// do we need to send anything down through the " void run" field
		// take message and send to input
		// start up input and output threads and assign them here

		while (true) {
			try {
				input = socket.getInputStream();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		}
		
	
	}
	public void setRealName(String realName){
		this.realName = realName;
	}
	
	
	public String getRealName() {
		return realName;
	}


	public Socket getSocket() {
		return this.socket;
	}

	public void setNick(String Nick) {
		this.Nick = Nick;

	}

	public String getNick() {
		return Nick;
	}

	public User getUser() {
		return this;
	}
}